package scottb.flex;

import java.awt.*;

public class Group extends FlexPanel implements FlexLayout {


    public Group(Component...components) {

        setLayout(new GroupLayoutManager());
        setOpaque(false);

        for(Component c : components) {
            add(c);
        }
    }

    public Group top(Integer top) {
        super.top(top);
        return this;
    }

    public Group left(Integer left) {
        super.left(left);
        return this;
    }

    public Group right(Integer right) {
        super.right(right);
        return this;
    }

    public Group bottom(Integer bottom) {
        super.bottom(bottom);
        return this;
    }

    public Group horizontalCenter(Integer center) {
        super.horizontalCenter(center);
        return this;
    }

    public Group verticalCenter(Integer center) {
        super.verticalCenter(center);
        return this;
    }

    public Group center() {
        super.center();
        return this;
    }

    public Group width(Integer width) {
        super.width(width);
        return this;
    }

    public Group height(Integer height) {
        super.height(height);
        return this;
    }

    // BACKGROUND

    public Group background(Color color) {

        super.background(color);

        return this;
    }

    public Group background(Integer color) {

        super.background(color);

        return this;
    }

    public Group backgroundAlpha(Float alpha) {

        super.backgroundAlpha(alpha);

        return this;
    }

    public Group backgroundAlpha(Double alpha) {

        super.backgroundAlpha(alpha);

        return this;
    }

    public Group gradient2(Integer color1, Integer color2) {

        super.gradient2(color1, color2);

        return this;
    }

    public Group gradient2(Color color1, Integer color2) {

        super.gradient2(color1, color2);

        return this;
    }

    public Group gradient2(Integer color1, Color color2) {

        super.gradient2(color1, color2);

        return this;
    }

    public Group gradient2(Color color1, Color color2) {

        super.gradient2(color1, color2);

        return this;
    }

    // BORDER

    public Group borderColor(Integer color) {

        super.borderColor(color);

        return this;
    }

    public Group borderColor(Color color) {

        super.borderColor(color);

        return this;
    }

    public Group borderWeight(Integer weight) {

        super.borderWeight(weight);

        return this;
    }

    public Group border(Integer color) {

        super.border(color);

        return this;
    }

    public Group border(Color color) {

        super.border(color);

        return this;
    }

    public Group border(Integer color, Integer weight) {

        super.border(color, weight);

        return this;
    }

    public Group border(Color color, Integer weight) {

        super.border(color, weight);

        return this;
    }

    public Group border(Integer color, Integer weight, Integer radius) {

        super.border(color, weight, radius);

        return this;
    }


    public Group cornerRadius(Integer radius) {

        super.cornerRadius(radius);

        return this;
    }

    public Group cornerRadius(Integer topLeft, Integer topRight, Integer bottomLeft, Integer bottomRight) {

        super.cornerRadius(topLeft, topRight, bottomLeft, bottomRight);

        return this;
    }

    // ADD CHILDREN
    public Group add(Component c) {
        super.add(c, 0);
        return this;
    }


}
